﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Platform.Storage
{
	public static class SearchStorageCapabilityExtensions
	{
		//public static bool Has( this SearchStorageCapabilities value, SearchStorageCapabilities mask )
		//{
		//    return ( ( int )value & ( int )mask ) == ( int )mask;
		//}

		internal static void CheckCapability( this ILibraryStorage storage, SearchStorageCapabilities capability )
		{
			if ( !storage.Capabilities.HasFlag( capability ) )
				throw new InvalidOperationException();
		}
	}

}
